package com.project.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.project.bean.DiscountBean;
import com.project.mapper.IDiscountMapper;
import com.project.service.IPromotionalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class PromotionalServiceImpl implements IPromotionalService {
    @Autowired
    private IDiscountMapper discountMapper;

    @Override
    public List<DiscountBean> findAllByStatus() {
        QueryWrapper<DiscountBean>qw=new QueryWrapper<>();
            qw.eq("Promotion","促销");
        return discountMapper.selectList(qw);
    }
}
